package com.yl.model;

import java.math.BigDecimal;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 
 * </p>
 *
 * @author lfs
 * @since 2020-11-19
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class Clients extends Model<Clients> {

    private static final long serialVersionUID = 1L;

    @TableId("CLIENT_ID")
    private BigDecimal clientId;

    @TableField("CLIENT_ACCOUNT")
    private String clientAccount;

    @TableField("CLIENT_PWD")
    private String clientPwd;

    /**
     * 1有效
     */
    @TableField("CLIENT_STATUS")
    private Integer clientStatus;

    @TableField("CLIENT_PHONE")
    private String clientPhone;

    @TableField("CLIENT_EMAIL")
    private String clientEmail;

    @TableField("CLIENT_REG_DATE")
    private LocalDateTime clientRegDate;

    @TableField("CLIENT_LAST_LOGIN_DATE")
    private LocalDateTime clientLastLoginDate;

    /**
     * 0-行业代表   1-服务中心  2-县级代理  3-市级代理  4-省级代理   5-工匠  6-商铺  9-普通用户
     */
    @TableField("CLIENT_LEVEL")
    private Integer clientLevel;

    /**
     * 工人分类
     */
    @TableField("CLIENT_CLASS_ID")
    private String clientClassId;

    /**
     * 默认 /skins/default.css；或 /skins/皮肤名称.css ，app调用
     */
    @TableField("SKINS")
    private String skins;

    /**
     * 公众号OPEN_ID
     */
    @TableField("OPEN_ID")
    private String openId;

    /**
     * 1-5级
     */
    @TableField("STAR_LEVEL")
    private Integer starLevel;

    /**
     * 1-微信，2-商城小程序，3-找工人小程序，4-工人端app
     */
    @TableField("REG_FROM")
    private Integer regFrom;

    @TableField("CLIENT_NAME")
    private String clientName;

    @TableField("AVATAR")
    private String avatar;

    /**
     * 0-女，1-男
     */
    @TableField("SEX")
    private Integer sex;

    @TableField("ORG_ID")
    private BigDecimal orgId;

    @TableField("ORG_NAME")
    private String orgName;

    /**
     * 用分数来算个人级别
     */
    @TableField("SCORE")
    private BigDecimal score;

    @TableField("START_LEVEL_NAME")
    private String startLevelName;

    /**
     * 商城小程序OPEN_ID
     */
    @TableField("OPEN_ID2")
    private String openId2;

    /**
     * 工人星级
     */
    @TableField("WORK_STAR_LEVEL")
    private Integer workStarLevel;

    /**
     * 找工人小程序OPEN_ID
     */
    @TableField("OPEN_ID3")
    private String openId3;

    @TableField("AREA_ID")
    private BigDecimal areaId;

    @TableField("UNION_ID")
    private String unionId;

    @TableField("EMERG_CONTACT")
    private String emergContact;

    @TableField("EMERG_TEL")
    private String emergTel;

    @TableField("AGE")
    private Integer age;

    /**
     * 评分
     */
    @TableField("WORKER_SCORE")
    private BigDecimal workerScore;

    /**
     * 好评率
     */
    @TableField("WORKER_GOOD_REPUTATION")
    private BigDecimal workerGoodReputation;

    @TableField("MARGIN")
    private BigDecimal margin;

    @TableField("QRCODE")
    private String qrcode;

    @TableField("OPEN_ID4")
    private String openId4;

    @TableField("IP")
    private String ip;


    @Override
    protected Serializable pkVal() {
        return this.clientId;
    }

}
